package com.example.demo.entity;

import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@RequiredArgsConstructor
@Data
public class Student implements Serializable {
    //学生的名字
//    @Size(min=3,message = "Name must be at least 3 characters long")
    @NotNull
    private String stuName;

    //@Range(min = 100,max = 999,message = "studentNo must be three-digit integer")
    @NotNull
    private int stuNo;
    //学生的学号
    //学生的年级1
    @NotNull
    private int stuGrade;
    //学生的专业     多个学生对应一个专业【多对一】
    private Profession profession;
    //学生的性别     多个学生对应一个性别【多对一】
    private Sex sex;
}
